package org.batatasframework.values;

import java.util.Date;
import java.util.List;


public abstract class DelegateValueReader implements ValueReader{

	protected abstract ValueReader getSource();

	@Override
	public String getString(String name) {
		return getSource().getString(name);
	}

	@Override
	public String getString(String name, String defaultValue) {
		return getSource().getString(name, defaultValue);
	}

	@Override
	public Integer getInteger(String name) {
		return getSource().getInteger(name);
	}

	@Override
	public Long getLong(String name) {
		return getSource().getLong(name);
	}

	@Override
	public Boolean getBoolean(String name) {
		return getSource().getBoolean(name);
	}

	@Override
	public int getInteger(String name, int defaultValue) {
		return getSource().getInteger(name, defaultValue);
	}

	@Override
	public long getLong(String name, long defaultValue) {
		return getSource().getLong(name, defaultValue);
	}

	@Override
	public boolean getBoolean(String name, boolean defaultValue) {
		return getSource().getBoolean(name, defaultValue);
	}

	@Override
	public Double getDouble(String name) {
		return getSource().getDouble(name);
	}

	@Override
	public double getDouble(String name, double defaultValue) {
		return getSource().getDouble(name, defaultValue);
	}

	@Override
	public <T> List<T> asList(String name) {
		return getSource().asList(name);
	}
	@Override
	public <E extends Enum<E>> E toEnum(String name, Class<E> clazz) {
		return getSource().toEnum(name, clazz);
	}

	@Override
	public <E extends Enum<E>> E toEnum(String name, Class<E> clazz, E defaultValue) {
		return getSource().toEnum(name, clazz, defaultValue);
	}

	@Override
	public <T> T getObject(String name, Class<T> clazz) {
		return getSource().getObject(name, clazz);
	}

	@Override
	public Class<?> getClassType(String name) {
		return getSource().getClassType(name);
	}
	
	@Override
	public Class<?> getClassType(String name, Class<?> defaultValue) {
		return getSource().getClassType(name, defaultValue);
	}
	
	@Override
	public Date getDate(String name, Object arg) {
		return getSource().getDate(name, arg);
	}

	@Override
	public Date getDate(String name, Object arg, Date defaultValue) {
		return getSource().getDate(name, arg, defaultValue);
	}

	@Override
	public String notNullString(String name, String message) {
		return getSource().notNullString(name, message);
	}

	@Override
	public int notNullInteger(String name, String message) {
		return getSource().notNullInteger(name, message);
	}

	@Override
	public long notNullLong(String name, String message) {
		return getSource().notNullLong(name, message);
	}

	@Override
	public boolean notNullBoolean(String name, String message) {
		return getSource().notNullBoolean(name, message);
	}

	@Override
	public double notNullDouble(String name, String message) {
		return getSource().notNullDouble(name, message);
	}

	@Override
	public <T extends Enum<T>> T notNullEnum(String name, Class<T> cls, String message) {
		return getSource().notNullEnum(name, cls, message);
	}

	@Override
	public Date notNullDate(String name, Object arg, String message) {
		return getSource().notNullDate(name, arg, message);
	}
	
	@Override
	public boolean is(String name, Object target) {
		return getSource().is(name, target);
	}
}
